<%@ page language="java"%>
<%@ taglib
	uri="http://java.sun.com/jsp/jstl/core"
	prefix="c"
%>
<%@ taglib
	uri="http://java.sun.com/jsp/jstl/fmt"
	prefix="fmt"
%>
<fmt:setBundle
	basename="Resources"
	var="bundle"
	scope="page"
/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
	var title = '<fmt:message key="title" bundle="${bundle}" />';
	alert(title);
</script>
<title><fmt:message
	key="title"
	bundle="${bundle}"
/></title>
</head>
<body>
<div><fmt:message
	key="language"
	bundle="${bundle}"
/>_<fmt:message
	key="country"
	bundle="${bundle}"
/></div>
<h2>Here is your preferred locale info...</h2>
<c:set
	var="clientLocale"
	value="${pageContext.request.locale}"
/>
<c:set
	var="clientLocales"
	value="${pageContext.request.locales}"
/>
Preferred locale: ${clientLocale.displayName}
<br />
Preferred locale country: ${clientLocale.displayCountry}
<br />
Preferred locale language: ${clientLocale.displayLanguage}
<h3>Lower priority locales...</h3>
<c:forEach
	var="loc"
	items="${clientLocales}"
	begin="1"
>
	Locale: ${loc.displayName}
	<br />
	Locale country: ${loc.displayCountry}
	<br />
	Locale language: ${loc.displayLanguage}
	<br />
	<br />
</c:forEach>
</body>
</html>
